<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>SmartphoneBrainScanner2: JAMA::Eigenvalue&lt; Real &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="sbs2_icon.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">SmartphoneBrainScanner2
   </div>
   <div id="projectbrief">A framework for building cross-platform real-time EEG applications. http://code.google.com/p/smartphonebrainscanner2/</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_j_a_m_a_1_1_eigenvalue.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">JAMA::Eigenvalue&lt; Real &gt; Class Template Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="jama__eig_8h_source.html">jama_eig.h</a>&gt;</code></p>

<p><a href="class_j_a_m_a_1_1_eigenvalue-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a28bf3e2df18bcd3d3f3b0979630953b3"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_a_m_a_1_1_eigenvalue.html#a28bf3e2df18bcd3d3f3b0979630953b3">Eigenvalue</a> (const <a class="el" href="class_t_n_t_1_1_array2_d.html">TNT::Array2D</a>&lt; Real &gt; &amp;A)</td></tr>
<tr class="memitem:ad01bfc213b887979f8f702acdd0a76c2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_a_m_a_1_1_eigenvalue.html#ad01bfc213b887979f8f702acdd0a76c2">getV</a> (<a class="el" href="class_t_n_t_1_1_array2_d.html">TNT::Array2D</a>&lt; Real &gt; &amp;V_)</td></tr>
<tr class="memitem:aae525e0f58b9ea03f183a4a75b46af50"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_a_m_a_1_1_eigenvalue.html#aae525e0f58b9ea03f183a4a75b46af50">getRealEigenvalues</a> (<a class="el" href="class_t_n_t_1_1_array1_d.html">TNT::Array1D</a>&lt; Real &gt; &amp;d_)</td></tr>
<tr class="memitem:ad72ed4bd3a07325097a1ef4e36a0480f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_a_m_a_1_1_eigenvalue.html#ad72ed4bd3a07325097a1ef4e36a0480f">getImagEigenvalues</a> (<a class="el" href="class_t_n_t_1_1_array1_d.html">TNT::Array1D</a>&lt; Real &gt; &amp;e_)</td></tr>
<tr class="memitem:aee57a1213656385928a3fb2c6a21e4b2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_a_m_a_1_1_eigenvalue.html#aee57a1213656385928a3fb2c6a21e4b2">getD</a> (<a class="el" href="class_t_n_t_1_1_array2_d.html">TNT::Array2D</a>&lt; Real &gt; &amp;D)</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><h3>template&lt;class Real&gt;<br/>
class JAMA::Eigenvalue&lt; Real &gt;</h3>

<pre class="fragment">Computes eigenvalues and eigenvectors of a real (non-complex)
matrix. 
</pre> <p>If A is symmetric, then A = V*D*V' where the eigenvalue matrix D is diagonal and the eigenvector matrix V is orthogonal. That is, the diagonal values of D are the eigenvalues, and V*V' = I, where I is the identity matrix. The columns of V represent the eigenvectors in the sense that A*V = V*D.</p>
<p>If A is not symmetric, then the eigenvalue matrix D is block diagonal with the real eigenvalues in 1-by-1 blocks and any complex eigenvalues, a + i*b, in 2-by-2 blocks, [a, b; -b, a]. That is, if the complex eigenvalues look like </p>
<pre></pre><pre>          u + iv     .        .          .      .    .
            .      u - iv     .          .      .    .
            .        .      a + ib       .      .    .
            .        .        .        a - ib   .    .
            .        .        .          .      x    .
            .        .        .          .      .    y
</pre><p> then D looks like </p>
<pre></pre><pre>            u        v        .          .      .    .
           -v        u        .          .      .    . 
            .        .        a          b      .    .
            .        .       -b          a      .    .
            .        .        .          .      x    .
            .        .        .          .      .    y
</pre><p> This keeps V a real matrix in both symmetric and non-symmetric cases, and A*V = V*D.</p>
<p>The matrix V may be badly conditioned, or even singular, so the validity of the equation A = V*D*inverse(V) depends upon the condition number of V.</p>
<p>(Adapted from <a class="el" href="namespace_j_a_m_a.html">JAMA</a>, a Java Matrix Library, developed by jointly by the Mathworks and NIST; see <a href="http://math.nist.gov/javanumerics/jama">http://math.nist.gov/javanumerics/jama</a>). </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a28bf3e2df18bcd3d3f3b0979630953b3"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Real &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_j_a_m_a_1_1_eigenvalue.html">JAMA::Eigenvalue</a>&lt; Real &gt;::<a class="el" href="class_j_a_m_a_1_1_eigenvalue.html">Eigenvalue</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_t_n_t_1_1_array2_d.html">TNT::Array2D</a>&lt; Real &gt; &amp;&#160;</td>
          <td class="paramname"><em>A</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<pre class="fragment">Check for symmetry, then construct the eigenvalue decomposition
</pre> <dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">A</td><td>Square real (non-complex) matrix </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="aee57a1213656385928a3fb2c6a21e4b2"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Real &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_j_a_m_a_1_1_eigenvalue.html">JAMA::Eigenvalue</a>&lt; Real &gt;::getD </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_t_n_t_1_1_array2_d.html">TNT::Array2D</a>&lt; Real &gt; &amp;&#160;</td>
          <td class="paramname"><em>D</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<pre class="fragment">    Computes the block diagonal eigenvalue matrix.
If the original matrix A is not symmetric, then the eigenvalue 
    matrix D is block diagonal with the real eigenvalues in 1-by-1 
    blocks and any complex eigenvalues,
a + i*b, in 2-by-2 blocks, [a, b; -b, a].  That is, if the complex
eigenvalues look like
</pre> <pre></pre><pre>          u + iv     .        .          .      .    .
            .      u - iv     .          .      .    .
            .        .      a + ib       .      .    .
            .        .        .        a - ib   .    .
            .        .        .          .      x    .
            .        .        .          .      .    y
</pre><p> then D looks like </p>
<pre></pre><pre>            u        v        .          .      .    .
           -v        u        .          .      .    . 
            .        .        a          b      .    .
            .        .       -b          a      .    .
            .        .        .          .      x    .
            .        .        .          .      .    y
</pre><p> This keeps V a real matrix in both symmetric and non-symmetric cases, and A*V = V*D. </p>
<pre class="fragment">@param D: upon return, the matrix is filled with the block diagonal 
eigenvalue matrix.</pre> 
</div>
</div>
<a class="anchor" id="ad72ed4bd3a07325097a1ef4e36a0480f"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Real &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_j_a_m_a_1_1_eigenvalue.html">JAMA::Eigenvalue</a>&lt; Real &gt;::getImagEigenvalues </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_t_n_t_1_1_array1_d.html">TNT::Array1D</a>&lt; Real &gt; &amp;&#160;</td>
          <td class="paramname"><em>e_</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<pre class="fragment">Return the imaginary parts of the eigenvalues
</pre><p> in parameter e_.</p>
<p>e_: new matrix with imaginary parts of the eigenvalues. </p>

</div>
</div>
<a class="anchor" id="aae525e0f58b9ea03f183a4a75b46af50"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Real &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_j_a_m_a_1_1_eigenvalue.html">JAMA::Eigenvalue</a>&lt; Real &gt;::getRealEigenvalues </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_t_n_t_1_1_array1_d.html">TNT::Array1D</a>&lt; Real &gt; &amp;&#160;</td>
          <td class="paramname"><em>d_</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<pre class="fragment">Return the real parts of the eigenvalues
</pre> <dl class="section return"><dt>Returns:</dt><dd>real(diag(D)) </dd></dl>

</div>
</div>
<a class="anchor" id="ad01bfc213b887979f8f702acdd0a76c2"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Real &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_j_a_m_a_1_1_eigenvalue.html">JAMA::Eigenvalue</a>&lt; Real &gt;::getV </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_t_n_t_1_1_array2_d.html">TNT::Array2D</a>&lt; Real &gt; &amp;&#160;</td>
          <td class="paramname"><em>V_</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<pre class="fragment">Return the eigenvector matrix
</pre> <dl class="section return"><dt>Returns:</dt><dd>V </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespace_j_a_m_a.html">JAMA</a></li><li class="navelem"><a class="el" href="class_j_a_m_a_1_1_eigenvalue.html">Eigenvalue</a></li>
    <li class="footer">Generated on Fri Jun 29 2012 14:30:34 for SmartphoneBrainScanner2 by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.1.1 </li>
  </ul>
</div>
</body>
</html>
